package com.echat.ebluetooth.protocol.entity;

import com.echat.ebluetooth.bean.Beacon;

import java.util.List;

/**
 * 1.包头 (1byte):0x55
 * 2.包长 (1byte):从本机S/N开始计算
 * 3.本机S/N (2byte):代表该定位器的序列号
 * 4.定位器状态 (1byte):bit7:(0→入网请求/1→业务数据)
 *                   bit65:(00~11→无电~满电)
 *                   bit4:(0→静止/1→运动)
 *                   bit3:(0→园区外退出/1→园区内退出)
 *                   bit2：(0→未按键/1→有按键报警)
 * 5.信标消息1 (3byte):信标Mac+RSSI;
 * 6.信标消息2 (3byte):信标Mac+RSSI;
 * 7.信标消息3 (3byte):信标Mac+RSSI;
 *
 */
public class BusinessData {

    private byte pkgHead;

    private byte pkgLength;

    private int account;

    private byte state;

    private List<Beacon> beaconList;

    public byte getPkgHead() {
        return pkgHead;
    }

    public void setPkgHead(byte pkgHead) {
        this.pkgHead = pkgHead;
    }

    public byte getPkgLength() {
        return pkgLength;
    }

    public void setPkgLength(byte pkgLength) {
        this.pkgLength = pkgLength;
    }

    public int getAccount() {
        return account;
    }

    public void setAccount(int account) {
        this.account = account;
    }

    public byte getState() {
        return state;
    }

    public void setState(byte state) {
        this.state = state;
    }

    public List<Beacon> getBeaconList() {
        return beaconList;
    }

    public void setBeaconList(List<Beacon> beaconList) {
        this.beaconList = beaconList;
    }

    @Override
    public String toString() {
        return "BusinessData{" +
                "pkgHead=" + pkgHead +
                ", pkgLength=" + pkgLength +
                ", account=" + account +
                ", state=" + state +
                ", beaconList=" + beaconList +
                '}';
    }
}
